package com.frxuexi.lib_base.utils

import java.util.concurrent.ConcurrentHashMap

object LiveDateBus {

    val map=ConcurrentHashMap<String,SingleLiveData<Any>>()

    fun <T> with(key:String,type:Class<T>):SingleLiveData<T>{
        if(!map.containsKey(key)){
            map[key]=SingleLiveData()
        }
        return map[key] as SingleLiveData<T>
    }
}